package com.blb.community.controller;

import com.blb.community.pojo.ResponseResult;
import com.blb.community.pojo.SysDictData;
import com.blb.community.service.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 字典数据表 前端控制器
 * </p>
 *
 * @author gch
 * @since 2023-12-06
 */
@CrossOrigin
@RestController
public class SysDictDataController {

    @Autowired
    private ISysDictDataService sysDictDataService;

    @GetMapping("/system/dictType-ownerState")
    public ResponseResult<List<SysDictData>> getDictTypeByOwnerState() {
        List<SysDictData> dictTypeByOwnerState = sysDictDataService.getDictTypeByOwnerState();
        return ResponseResult.ok(dictTypeByOwnerState);
    }
}
